package com.rocksea.app.tasks;

import com.rocksea.app.db.HighStrain.HighStrain;
import com.rocksea.app.db.SonicWave.SonicWave;
import com.rocksea.app.db.StaticLoad.StaticLoad;
import com.rocksea.app.db.lowStrain.LowStrainDb;

/**
 * Created by 吴志华 on 2017/10/26.
 * 数据过度桥
 *
 * @FileName:com.rocksea.app.tasks.Temp.java
 */

public class Temp
{

    private static LowStrainDb mLowStrainDb;
    private static HighStrain mHighStrain;
    private static SonicWave mSonicWave;
    private static StaticLoad mStaticLoad;

    public static LowStrainDb getLowStrainDb() {
        return mLowStrainDb;
    }

    public static void setLowStrainDb(LowStrainDb mLowStrainDb) {
        Temp.mLowStrainDb = mLowStrainDb;
    }

    public static HighStrain getHighStrain() {
        return mHighStrain;
    }

    public static void setHighStrain(HighStrain mHighStrain) {
        Temp.mHighStrain = mHighStrain;
    }

    public static SonicWave getSonicWave() {
        return mSonicWave;
    }

    public static void setSonicWave(SonicWave mSonicWave) {
        Temp.mSonicWave = mSonicWave;
    }

    public static StaticLoad getStaticLoad() {
        return mStaticLoad;
    }

    public static void setStaticLoad(StaticLoad mStaticLoad) {
        Temp.mStaticLoad = mStaticLoad;
    }

    public static void clear() {
        setHighStrain(null);
        setSonicWave(null);
        setStaticLoad(null);
        setLowStrainDb(null);
    }

    public static void makeSonicWaveDataValid(String uuid, int valid)
    {
        if (mSonicWave!=null)
        {
            for (int i = 0; i < mSonicWave.SonicWaveDatas.size(); i++) {
                if (mSonicWave.SonicWaveDatas.get(i).uuid.equals(uuid))
                {
                    mSonicWave.SonicWaveDatas.get(i).isValid = (byte) valid;
                }
            }
        }

    }
}
